Hello world in Gtk Javascript
Published 2007-06-01 00:24:02
My last entry described how to create objects for dmdscript, I made a brief comment, that gtk javascript might be quite cool.. Well after a bit of hacking I got hello world to work. (well and a bit more..)
I started with the GtkD bindings code generator, and extracted out the HTML parser code (it parses the HTML API docs). The based on the code from the last post, and some of the ideas from GtkD generated all the classes for dmdscript.
At present:
run with
Gtk.init();
var w = new Gtk.Window(0);
w.setTitle("hello world");
w.showAll();
Gtk.main();
/tmp/gtkjs hello.ds
I started with the GtkD bindings code generator, and extracted out the HTML parser code (it parses the HTML API docs). The based on the code from the last post, and some of the ideas from GtkD generated all the classes for dmdscript.
At present:
- 317 Classes, Including Atk, Glib, Gobject, gthread, gdk, gdkpixbuf, glade gtk and pango
- 2554 Methods should be working.
- Signals - I've got a prototype working for this, so It's mostly a matter of writing the generation code.
- Enums - They are in the D code, but no exported to the Javascript side.
- Argument checking.. - Should be pretty trivial to add..
- Return checking.. again pretty trivial..
- Custom code for non-generated methods, Structs etc.
- Tiding up the APILookup files. - - they are pretty similar to the GtkD code at present, and my generator just ignores alot of them.
- Lots of code tidy ups.. (the class registration is a bit of a brute force hack)
svn co http://www.akbkhome.com/svn/gtkDSNow I just wonder what use it is ;)
cd gtkDS/wrap
#download API Files (needs curl / tar etc.)
sh downloadFiles.sh
#compile it - needs dmd installed..
sh buildit.sh
cd ..
#build the bindings - requires compd from dsource.org/projects/dool
compd gdkds.compd
/tmp/gtkjs test/hello.ds
H
Mentioned By:
www.dzone.com : Hello world in Gtk Javascript (2048 referals)
google.com : javascript gtk (354 referals)
google.com : gtk JavaScript (262 referals)
google.com : december (79 referals)
google.com : april (77 referals)
google.com : php hello world (44 referals)
www.ruby-forum.com : Where does ruby excel? - Ruby Forum (32 referals)
google.com : GTK js (26 referals)
www.digitalmars.com : Digital Mars - digitalmars.D.announce - Gtk bindings to dmdscript (24 referals)
google.com : javascript gtk bindings (24 referals)
www.linuxpourtous.com : Linuxpourtous.com - Hello world in Gtk Javascript (21 referals)
google.com : js gtk (20 referals)
www.dzone.com : DZone - New links (19 referals)
www.planet-php.net : Planet PHP (15 referals)
google.com : gtk javascript (15 referals)
www.phpeye.com : Hello world in Gtk Javascript - Alan Knowles|PHP教程|PHP新闻|PHP5|PEAR|PHP框架|PHPEye - Powered by HappyCMS (11 referals)
google.com : gtk javascript binding (11 referals)
google.com : javascript gtk binding (11 referals)
google.com : php GTK javascript (9 referals)
google.com : php hello (9 referals)
www.dzone.com : Hello world in Gtk Javascript (2048 referals)
google.com : javascript gtk (354 referals)
google.com : gtk JavaScript (262 referals)
google.com : december (79 referals)
google.com : april (77 referals)
google.com : php hello world (44 referals)
www.ruby-forum.com : Where does ruby excel? - Ruby Forum (32 referals)
google.com : GTK js (26 referals)
www.digitalmars.com : Digital Mars - digitalmars.D.announce - Gtk bindings to dmdscript (24 referals)
google.com : javascript gtk bindings (24 referals)
www.linuxpourtous.com : Linuxpourtous.com - Hello world in Gtk Javascript (21 referals)
google.com : js gtk (20 referals)
www.dzone.com : DZone - New links (19 referals)
www.planet-php.net : Planet PHP (15 referals)
google.com : gtk javascript (15 referals)
www.phpeye.com : Hello world in Gtk Javascript - Alan Knowles|PHP教程|PHP新闻|PHP5|PEAR|PHP框架|PHPEye - Powered by HappyCMS (11 referals)
google.com : gtk javascript binding (11 referals)
google.com : javascript gtk binding (11 referals)
google.com : php GTK javascript (9 referals)
google.com : php hello (9 referals)
Follow us
-
- Some thoughts on the language server and its usefulness in the roobuilder
- Roo Builder for Gtk4 moving forward
- Clustered Web Applications - Mysql and File replication
- GitLive - Branching - Merging
- PDO_DataObject Released
- PDO_DataObject is under way
- Mass email Marketing and anti-spam - some of the how-to..
- Hydra - Recruitment done right
Blog Latest
-
Twitter - @Roojs